OLE DB Connection String

An OLE DB Connection String is a connection string to a database. It includes a type of the database server, the server name, security attributes and etc.

OLE DB is a set of a COM interfaces. They provide to TrafMeter an uniform data access to various data sources regardless of a data location or data types. ADO (ActiveX Data Objects) implements a high-performance interface for OLE DB.

 

Installing ADO on your Computer

To properly install ADO on your computer, you need to install MDAC (Microsoft Data Access Components). This installs both ADO and necessary underlying ADO components. MDAC is available free for download from the Web at the following URL:
 
    http://www.microsoft.com/data

 

Creating OLE DB Connection String

The connection string has a complex syntax. For example, the connection string for Microsoft SQL Server can be as follows:
 
SQLOLEDB.1;Password=trafmeter;Persist Security Info=True;
User ID=meter;Initial Catalog=traffic;Data Source=SERVERNAME

The connection string can be stored in special file also known as "data link file" or a UDL file (*.udl). You can use a UDL Wizard to create the UDL file. Having created the UDL file, you can refer to it in the connection string as follows:
 
File Name=c:\DataLinks\trafmeter.udl

If you change database or network configuration, you can simply modify the UDL file and distribute its new version.

 

Creating the OLE DB Connection String for Microsoft SQL Server Database

Warning! You must create SQL Server account and database before making the connection string.

 

Creating the OLE DB Connection String for Microsoft Access Database

Warning! You must create Microsoft Access database before making the connection string.

See also: Creating an OLE DB Connection String for MySQL Server Database